<!--
 * @Author: wcx
 * @Email: 1055127249@qq.com
 * @Date: 2025-01-07 16:42:21
 * @LastEditors: wcx 1055127249@qq.com
 * @LastEditTime: 2025-01-21 15:23:46
 * @FilePath: \my-project\src\views\CreateFormBiz\components\preview.vue
 * @Description: 描述
-->
<template>
  <el-dialog title="预览" :visible.sync="visible">
    <baseForm v-bind="formConfig" :fields="fields" @change="change" @submit="onSubmit"/>
  </el-dialog>
</template>
<script>
import baseForm from '@/components/jsx/Form'
export default {
  components: {
    baseForm
  },
  data() {
    return {
      visible: false,
      formConfig: {},
      fields: []
    }
  },
  methods: {
    change(v) {
      console.log('父组件change', v)
    },
    onSubmit(v){
      console.log('父组件submit', v)
    },
    show(fields, formConfig) {
      this.fields = fields;
      this.formConfig = formConfig;
      this.visible = true;
    }
  },
}
</script>